import cv2
import numpy as np
from matplotlib import pyplot as plt
import time

from PIL import ImageGrab

import cv2
import numpy as np
# from matplotlib import pyplot as plt
import autopy3 as autopy
import time

while(1):
    start = time.time()

    im0 =ImageGrab.grab((0, 0, 2880, 1800)) #长  宽   结束长  结束宽
    # im0 =ImageGrab.grab()
    end = time.time()
    print(end-start)
    # im0 =ImageGrab.grab((0, 1500, 2880, 1800)).convert('RGB')
    # print(im0.getpixel((10,10)) )
    im0.save("123.jpg",'jpeg')


